token: function(stream, state) { if (!state.tagName && stream.sol()) { state.startOfLine = true;
state.indented = stream.indentation();
if (stream.eatSpace()) return null;
var style = state.tokenize(stream, state);
if ((style || type) && style != "comment") { state.state = state.state(type || style, stream, state);
style = setStyle == "error" ? style + " error" : setStyle;
state.startOfLine = false;
indent: function(state, textAfter, fullLine) { var context = state.context;
if (state.tokenize.isInAttribute) { return state.stringStartCol + 1;
if ((state.tokenize != inTag && state.tokenize != inText) ||
context && context.noIndent)
return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
if (multilineTagIndentPastTag)
return state.tagStart + state.tagName.length + 2;
return state.tagStart + indentUnit * multilineTagIndentFactor;
if (alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
if (context && /^<\//.test(textAfter))
while (context && !context.startOfLine)
if (context) return context.indent + indentUnit;
blockCommentStart: "<!--",
configuration: parserConfig.htmlMode ? "html" : "xml",
helperType: parserConfig.htmlMode ? "html" : "xml"
CodeMirror.defineMIME("text/xml", "xml");CodeMirror.defineMIME("application/xml", "xml");if (!CodeMirror.mimeModes.hasOwnProperty("text/html")) CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});